<?php
/**
 * Created by PhpStorm.
 * User: yf
 * Date: 2019-01-01
 * Time: 20:06
 */

return [
    'SERVER_NAME' => "EasySwoole",
    'MAIN_SERVER' => [
        'LISTEN_ADDRESS' => '0.0.0.0',
        'PORT' => 9572,
        'SERVER_TYPE' => EASYSWOOLE_WEB_SOCKET_SERVER, //可选为 EASYSWOOLE_SERVER  EASYSWOOLE_WEB_SERVER EASYSWOOLE_WEB_SOCKET_SERVER,EASYSWOOLE_REDIS_SERVER
        'SOCK_TYPE' => SWOOLE_TCP,
        'RUN_MODEL' => SWOOLE_PROCESS,
        'SETTING' => [
            'worker_num' => 16,
            'reload_async' => true,
            'max_wait_time' => 3
        ],
        'TASK' => [
            'workerNum' => 8,
            'maxRunningNum' => 128,
            'timeout' => 15
        ]
    ],
    'TEMP_DIR' => null,
    'LOG_DIR' => null,
    'PHAR' => [
        'EXCLUDE' => ['.idea', 'Log', 'Temp', 'easyswoole', 'easyswoole.install', 'cert']
    ],
    'MYSQL' => [
        'host' => 'rm-8vbiy5uo264z4iz71.mysql.zhangbei.rds.aliyuncs.com',//防止报错,就不切换数据库了
        'port' => '3306',
        'user' => 'root',//数据库用户名
        'password' => '8DYeoDEhVofUspP5o95W7taz7FLwWRB',//数据库密码
        'database' => 'finance',//数据库
        'timeout' => '5',
        'charset' => 'utf8mb4',
        'POOL_MAX_NUM' => '16',
        'POOL_TIME_OUT' => '0.1'
    ],

    /*################ REDIS CONFIG ##################*/
    'REDIS' => [
        'host' => '127.0.0.1',
        'port' => '6379',
        'auth' => '',
        'intervalCheckTime' => 30 * 1000,//定时验证对象是否可用以及保持最小连接的间隔时间
        'maxIdleTime' => 15,//最大存活时间,超出则会每$intervalCheckTime/1000秒被释放
        'maxObjectNum' => 20,//最大创建数量
        'minObjectNum' => 5,//最小创建数量 最小创建数量不能大于等于最大创建
        'POOL_MAX_NUM' => '16',
        'POOL_TIME_OUT' => '0.1',
    ],

    'FAST_CACHE' => [//fastCache组件
        'PROCESS_NUM' => 1//进程数,大于0才开启
    ],

    'WECHAT' => [
        'officialAccount' => [
            'appId' => 'wx3cbeced0ef8527a2',
            'appSecret' => '4cfd8ac773ad55fb1f79e34b973f177d'
        ],
        'pay' => [
            'appId' => 'wx3cbeced0ef8527a2',
            'mchId' => '1244564602',
            'key' => 'a2137d48824140859d2b96e1199c19b1',
            'notifyUrl' => '',
            'apiClientCert' => '/cert/apiclient_cert.pem',
            'apiClientKey' => '/cert/apiclient_key.pem',
        ],
    ]

];
